/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.util.List;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.entity.EntityPlayerSP;
/*     */ import net.minecraft.client.multiplayer.WorldClient;
/*     */ import net.minecraft.client.renderer.GlStateManager;
/*     */ import net.minecraft.client.renderer.entity.RenderManager;
/*     */ import net.minecraft.entity.Entity;
/*     */ import net.minecraft.entity.EntityLivingBase;
/*     */ import net.minecraftforge.client.event.RenderLivingEvent;
/*     */ import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
/*     */ import net.minecraftforge.fml.common.eventhandler.EventPriority;
/*     */ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
/*     */ import net.minecraftforge.fml.common.gameevent.TickEvent;
/*     */ import org.yaml.snakeyamla.configuration.file.YamlConfiguration;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ @EventBusSubscriber(modid = "dragoncore")
/*     */ public class ns
/*     */ {
/*     */   @SubscribeEvent
/*     */   public static void v(TickEvent.ClientTickEvent a) {
/*  32 */     WorldClient worldClient = (Minecraft.func_71410_x()).field_71441_e;
/*  33 */     if (worldClient != null) {
/*  34 */       List list = worldClient.func_72910_y();
/*  35 */       for (Entity entity : list) {
/*     */         
/*  37 */         wo wo = (wo)pz.i.g.getIfPresent(entity.func_110124_au());
/*  38 */         if (wo != null) {
/*     */           
/*  40 */           String str = wo.d.get("name");
/*  41 */           if (!str.equals(pz.i.getEntityName(entity))) {
/*  42 */             pz.i.g.invalidate(entity.func_110124_au());
/*     */             
/*     */             continue;
/*     */           } 
/*  46 */           wo.v(wn.ha);
/*     */           
/*  48 */           if (entity instanceof EntityLivingBase) {
/*  49 */             EntityLivingBase entityLivingBase = (EntityLivingBase)entity;
/*  50 */             wo.w = entityLivingBase;
/*     */             
/*  52 */             String str1 = wo.d.get("health");
/*  53 */             String str2 = String.valueOf(entityLivingBase.func_110143_aJ());
/*     */             
/*  55 */             String str3 = wo.d.get("health_max");
/*  56 */             String str4 = String.valueOf(entityLivingBase.func_110138_aP());
/*     */             
/*  58 */             if ((str1 != null && !str1.equals(str2)) || (str3 != null && !str3.equals(str4))) {
/*  59 */               bh bh = wo.t.get(wn.e.v());
/*  60 */               if (bh != null) {
/*  61 */                 eh.v(bh, new o[] { new ah(str1), new ah(str2) });
/*     */               }
/*     */             } 
/*  64 */             wo.d.put("health", str2);
/*  65 */             wo.d.put("health_max", str4);
/*     */           } 
/*     */         } 
/*     */       } 
/*     */     } 
/*     */   }
/*     */ 
/*     */   
/*     */   @SubscribeEvent(priority = EventPriority.HIGH)
/*     */   public static void v(RenderLivingEvent.Specials.Pre a) {
/*  75 */     if (a.isCanceled())
/*     */       return; 
/*  77 */     EntityLivingBase entityLivingBase = a.getEntity();
/*     */     
/*  79 */     pz pz = pz.i;
/*     */     
/*  81 */     wo wo = (wo)pz.g.getIfPresent(entityLivingBase.func_110124_au());
/*  82 */     if (wo == null) {
/*  83 */       YamlConfiguration yamlConfiguration = pz.getMatchYaml((Entity)entityLivingBase);
/*  84 */       if (yamlConfiguration != null) {
/*  85 */         wo = new wo(entityLivingBase, yamlConfiguration);
/*  86 */         wo.d.put("name", pz.getEntityName((Entity)entityLivingBase));
/*  87 */         pz.g.put(entityLivingBase.func_110124_au(), wo);
/*  88 */         wo.v(wn.k);
/*     */       } 
/*     */     } 
/*     */     
/*  92 */     if (wo == null) {
/*     */       return;
/*     */     }
/*  95 */     RenderManager renderManager = Minecraft.func_71410_x().func_175598_ae();
/*  96 */     switch (wo.f) {
/*     */       case "aim":
/*  98 */         if (renderManager.field_147941_i != entityLivingBase) {
/*     */           return;
/*     */         }
/*     */         break;
/*     */       
/*     */       case "health":
/* 104 */         if (entityLivingBase.func_110143_aJ() == entityLivingBase.func_110138_aP())
/*     */           return; 
/*     */         break;
/*     */       case "aimorhealth":
/* 108 */         if (renderManager.field_147941_i != entityLivingBase && entityLivingBase.func_110143_aJ() == entityLivingBase.func_110138_aP())
/*     */           return; 
/*     */         break;
/*     */     } 
/* 112 */     if (wo.f.startsWith("distance_")) {
/* 113 */       int i = 10;
/*     */       try {
/* 115 */         i = Integer.parseInt(wo.f.substring(9));
/* 116 */       } catch (Exception exception) {}
/*     */ 
/*     */ 
/*     */       
/* 120 */       EntityPlayerSP entityPlayerSP = (Minecraft.func_71410_x()).field_71439_g;
/* 121 */       if (entityPlayerSP.func_70032_d((Entity)entityLivingBase) > i) {
/*     */         return;
/*     */       }
/*     */     } 
/* 125 */     a.setCanceled(true);
/*     */ 
/*     */     
/* 128 */     float f1 = (float)a.getX();
/* 129 */     float f2 = (float)((float)a.getY() + wo.z.z());
/* 130 */     float f3 = (float)a.getZ();
/* 131 */     float f4 = renderManager.field_78735_i;
/* 132 */     float f5 = renderManager.field_78732_j;
/* 133 */     boolean bool = (renderManager.field_78733_k.field_74320_O == 2);
/*     */ 
/*     */     
/* 136 */     GlStateManager.func_179094_E();
/* 137 */     GlStateManager.func_179109_b(f1, f2, f3);
/* 138 */     GlStateManager.func_187432_a(0.0F, 1.0F, 0.0F);
/* 139 */     GlStateManager.func_179114_b(-f4, 0.0F, 1.0F, 0.0F);
/* 140 */     GlStateManager.func_179114_b((bool ? -1 : true) * f5, 1.0F, 0.0F, 0.0F);
/* 141 */     GlStateManager.func_179152_a(-0.025F, -0.025F, 0.025F);
/* 142 */     GlStateManager.func_179140_f();
/* 143 */     GlStateManager.func_179132_a(false);
/*     */     
/* 145 */     GlStateManager.func_179097_i();
/*     */     
/* 147 */     GlStateManager.func_179147_l();
/* 148 */     GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
/*     */ 
/*     */     
/* 151 */     if (wo.r) {
/* 152 */       GlStateManager.func_179094_E();
/* 153 */       jo.v(0.5F);
/* 154 */       wo.v(entityLivingBase, a.getPartialRenderTick(), true);
/* 155 */       GlStateManager.func_179121_F();
/*     */     } 
/* 157 */     GlStateManager.func_179126_j();
/*     */ 
/*     */     
/* 160 */     GlStateManager.func_179132_a(true);
/* 161 */     GlStateManager.func_179094_E();
/* 162 */     jo.v(1.0F);
/* 163 */     wo.v(entityLivingBase, a.getPartialRenderTick(), false);
/* 164 */     GlStateManager.func_179121_F();
/*     */ 
/*     */     
/* 167 */     GlStateManager.func_179145_e();
/* 168 */     GlStateManager.func_179084_k();
/* 169 */     GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
/* 170 */     GlStateManager.func_179121_F();
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\ns.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */